<?php
namespace app\api\route;
use think\facade\Route;
use app\api\middleware\Auth;
use app\api\validate\user\UserValidate;
Route::post('reg', 'user.Userweb/register')->middleware([Auth::class])->validate(UserValidate::class, 'reg');
Route::post('login', 'user.Userweb/login')->middleware([Auth::class])->validate(UserValidate::class, 'login');
Route::group("user", function () {
    Route::post('me', 'user.User/detail');
    Route::post('edit', 'user.User/updateInfo');
    Route::get('lists', 'user.User/lists');
})->middleware([Auth::class]);

Route::group("grade", function () {
    Route::get('buyable', 'user.Grade/buyableLists');
    Route::post("buy", "user.Grade/buy");
})->middleware([Auth::class]);